package org.example.domain.order.model.entity;


import lombok.*;

import java.math.BigDecimal;

/**
 * @author yinghuashen
 * @version 1.0
 * @description:
 * @date 2025/3/9 21:43
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderEntity {

    // 定义订单状态的静态枚举
    @Getter
    public static enum OrderStatus {
        // 待支付，对应状态码 0
        PENDING_PAYMENT(0),
        // 已支付，对应状态码 1
        PAID(1),
        // 已发货，对应状态码 2
        SHIPPED(2),
        // 已完成，对应状态码 3
        COMPLETED(3),
        // 已取消，对应状态码 4
        CANCELLED(4);

        private final int code;

        OrderStatus(int code) {
            this.code = code;
        }
    }

    private String orderId;

    private String userId;

    private String productId;

    private String productName;

    private Integer productAmount;

    private BigDecimal originalPrice;

    private BigDecimal payPrice;

    private Integer status;
}